<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>淘宝购物车页面</title>
    <link href="${pageContext.request.contextPath}/css/myCart.css" rel="stylesheet"/>
</head>
<body>
<div id="header"><img height="55px" src="${pageContext.request.contextPath}/images/login.png" alt="logo"/></div>
<div id="nav">您的位置：<a href="#">首页</a> &gt; <a href="#">我的宝贝</a> &gt; 我的购物车</div>
<div id="navlist">
    <ul>
        <li class="navlist_red_left"></li>
        <li class="navlist_red">1. 查看购物车</li>
        <li class="navlist_red_arrow"></li>
        <li class="navlist_gray">2. 确认订单信息</li>
        <li class="navlist_gray_arrow"></li>
        <li class="navlist_gray">3. 付款到支付宝</li>
        <li class="navlist_gray_arrow"></li>
        <li class="navlist_gray">4. 确认收货</li>
        <li class="navlist_gray_arrow"></li>
        <li class="navlist_gray">5. 评价</li>
        <li class="navlist_gray_right"></li>
    </ul>
</div>

<div id="content">
    <form action="/produceOrder2" method="post" name="myform" id="myform">
        <table width="100%" border="0px" cellspacing="0" cellpadding="0" id="shopping">
            <tr>
                <td class="title_1"><input id="allCheckBox" type="checkbox" value=""/>全选<br/> <input
                        id="reverseCheckBox" type="checkbox"
                        value=""/>反选
                </td>
                <td class="title_2" colspan="2">店铺宝贝</td>
                <td class="title_3">获积分</td>
                <td class="title_4">单价（元）</td>
                <td class="title_5">数量</td>
                <td class="title_6">小计（元）</td>
                <td class="title_7">操作</td>
            </tr>
            <tbody id="trData">
            <c:forEach items="${cart}" var="list">
                <tr>
                    <td colspan="8" class="line"></td>
                </tr>
                <tr id="product1">
                    <td class="cart_td_1"><input name="cartCheckBox" type="checkbox" value="${list.id}"/></td>
                    <td class="cart_td_2"><img height="90px"
                                               src="${pageContext.request.contextPath}/files/${list.fileName}"
                                               alt="shopping"/></td>
                    <td class="cart_td_3"><a href="#">${list.name}</a><br/>
                        保障：<img src="${pageContext.request.contextPath}/images/taobao_icon_01.jpg" alt="icon"/></td>
                    <td class="cart_td_4">${list.price/10.0}</td>
                    <td class="cart_td_5">${list.price}</td>
                    <td class="cart_td_6"><img src="${pageContext.request.contextPath}/images/taobao_minus.jpg"
                                               alt="minus"
                                               class="hand"/>
                        <input id="num_1" type="text"
                               value="${list.number}" class="num_input" readonly/> <img
                                src="${pageContext.request.contextPath}/images/taobao_adding.jpg" alt="add"
                                class="hand"/></td>
                    <td class="cart_td_7"></td>
                    <td class="cart_td_8"><a name="delOne" onclick='removeSession(${list.id})'>删除</a></td>
                </tr>
            </c:forEach>
            <tr>
                <td colspan="3"><a id="deleteAll" href="javascript:void(0);"><img
                        src="${pageContext.request.contextPath}/images/taobao_del.jpg"
                        alt="delete"/></a></td>
                <td colspan="5" class="shopend">商品总价（不含运费）：<label id="total" class="yellow"></label> 元<br/>
                    可获积分 <label class="yellow" id="integral"></label> 点<br/>

                    <a href="/getGoodsByPage" target="_self"><img
                            src="${pageContext.request.contextPath}/images/buy1.gif"></a>
                    <a href="javascript:myform.submit()"><img src="${pageContext.request.contextPath}/images/buy2.gif"></a>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<script src="${pageContext.request.contextPath}js/jquery-1.12.4.js"></script>
<script src="${pageContext.request.contextPath}js/myCart.js"></script>
</body>
</html>
